Comments (7)
Try to set up default value of the query parameter and add reference to a report parameter.
Unfortunately doesnt worked. throws "input string was not in a correct format"
Here is my xml :
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/25/2019 00:35:52" ReportInfo.Modified="07/25/2019 00:40:34" ReportInfo.CreatorVersion="2019.3.0.0"> <Dictionary> <PostgresDataConnection Name="Connection" ConnectionString="my con"> <TableDataSource Name="Table" DataType="System.Int32" Enabled="true" SelectCommand="select * from public."s_kullanici" where "s_kullanici"."id"=@prm"> <CommandParameter Name="prm" DataType="1"/> </TableDataSource> </PostgresDataConnection> </Dictionary> <ReportPage Name="Page1" Watermark.Font="Arial, 60pt"> <ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8"/> <PageHeaderBand Name="PageHeader1" Top="40.47" Width="718.2" Height="28.35"/> <DataBand Name="Data1" Top="71.48" Width="718.2" Height="75.6"/> <PageFooterBand Name="PageFooter1" Top="149.75" Width="718.2" Height="18.9"/> </ReportPage> </Report>
Yes it works.
from fastreport.
Hello!
I've checked parameters in Npgsql connection. You should use it like here:
select * from public."Users" where "Users"."Name"= @Name
And create parameter next.
The full example:
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/22/2019 17:15:27" ReportInfo.Modified="07/22/2019 17:34:34" ReportInfo.CreatorVersion="2019.3.0.0">
<Dictionary>
<PostgresDataConnection Name="Connection" ConnectionString="your con">
<TableDataSource Name="public_Users" DataType="System.Int32" Enabled="true" TableName="public."Users"">
<Column Name="id" DataType="System.Int32"/>
<Column Name="Name" DataType="System.String"/>
</TableDataSource>
<TableDataSource Name="Table" DataType="System.Int32" Enabled="true" SelectCommand="select * from public."Users" where "Users"."Name"= @Name">
<Column Name="id" DataType="System.Int32"/>
<Column Name="Name" DataType="System.String"/>
<CommandParameter Name="Name" DataType="19" Expression="[Name]" DefaultValue="Ivan"/>
</TableDataSource>
</PostgresDataConnection>
<Parameter Name="Name" DataType="System.String" Expression=""Ivan""/>
</Dictionary>
<ReportPage Name="Page1" Watermark.Font="Arial, 60pt">
<ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8"/>
<PageHeaderBand Name="PageHeader1" Top="41.8" Width="718.2" Height="28.35">
<TextObject Name="Text2" Left="85.05" Width="94.5" Height="18.9" Text="id" Font="Arial, 10pt"/>
<TextObject Name="Text4" Left="283.5" Width="94.5" Height="18.9" Text="Name" Font="Arial, 10pt"/>
</PageHeaderBand>
<DataBand Name="Data1" Top="74.15" Width="718.2" Height="75.6" DataSource="Table">
<TextObject Name="Text1" Left="85.05" Top="28.35" Width="94.5" Height="18.9" Text="[Table.id]" Font="Arial, 10pt"/>
<TextObject Name="Text3" Left="283.5" Top="28.35" Width="94.5" Height="18.9" Text="[Table.Name]" Font="Arial, 10pt"/>
</DataBand>
<PageFooterBand Name="PageFooter1" Top="153.75" Width="718.2" Height="18.9"/>
</ReportPage>
</Report>
from fastreport.
Unfortunately doesnt worked. throws "input string was not in a correct format"
Here is my xml :
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/25/2019 00:35:52" ReportInfo.Modified="07/25/2019 00:40:34" ReportInfo.CreatorVersion="2019.3.0.0"> <Dictionary> <PostgresDataConnection Name="Connection" ConnectionString="my con"> <TableDataSource Name="Table" DataType="System.Int32" Enabled="true" SelectCommand="select * from public."s_kullanici" where "s_kullanici"."id"=@prm"> <CommandParameter Name="prm" DataType="1"/> </TableDataSource> </PostgresDataConnection> </Dictionary> <ReportPage Name="Page1" Watermark.Font="Arial, 60pt"> <ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8"/> <PageHeaderBand Name="PageHeader1" Top="40.47" Width="718.2" Height="28.35"/> <DataBand Name="Data1" Top="71.48" Width="718.2" Height="75.6"/> <PageFooterBand Name="PageFooter1" Top="149.75" Width="718.2" Height="18.9"/> </ReportPage> </Report>
from fastreport.
Using integer or bigint parameter datatype causes this problem. In my case the id field is mapped to a long property. If i select text as parameter datatype exception says id is bigint. If i select bigint throws "input string was not in a correct format"
from fastreport.
Same issue here
from fastreport.
Try to set up default value of the query parameter and add reference to a report parameter.
Unfortunately doesnt worked. throws "input string was not in a correct format"
Here is my xml :
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/25/2019 00:35:52" ReportInfo.Modified="07/25/2019 00:40:34" ReportInfo.CreatorVersion="2019.3.0.0"> <Dictionary> <PostgresDataConnection Name="Connection" ConnectionString="my con"> <TableDataSource Name="Table" DataType="System.Int32" Enabled="true" SelectCommand="select * from public."s_kullanici" where "s_kullanici"."id"=@prm"> <CommandParameter Name="prm" DataType="1"/> </TableDataSource> </PostgresDataConnection> </Dictionary> <ReportPage Name="Page1" Watermark.Font="Arial, 60pt"> <ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8"/> <PageHeaderBand Name="PageHeader1" Top="40.47" Width="718.2" Height="28.35"/> <DataBand Name="Data1" Top="71.48" Width="718.2" Height="75.6"/> <PageFooterBand Name="PageFooter1" Top="149.75" Width="718.2" Height="18.9"/> </ReportPage> </Report>
from fastreport.
Same issue here
Try the same solution, please
from fastreport.
Related Issues (20)
- FillTableData in DataConnectionBase overwrites CommandType set by GetAdapter in FastReport.Data.OracleODPCore.OracleDataConnection HOT 2
- ITF14 Barcode border error when translate it. HOT 2
- Save and Print buttons not working HOT 3
- Rich Text Blob Issue
- position:absolute shouldn't be used for html email
- Digital Signature HOT 1
- Refresh button click in WebReports 500 index out of range issue occur
- Exception when try create a Postgres connection HOT 4
- Error CS0103: The name 'Produto' does not exist in the current context
- Adding/Editing/Testing Connection Error HOT 1
- Unable to add Nuget package FastReport.OpenSource to .NET 8 project HOT 2
- The Title property of PDFSimpleExport is not setting the title on the resulting PDF page as expected.
- Some Chinese characters in the ubuntu system are displayed incorrectly HOT 1
- Container em Linux RadHat - .Net 8 - One or more errors occurred. (The type initializer for 'FastReport.Report' threw an exception.) HOT 2
- Add new Datasource mysql in designer.exe HOT 1
- VisibleExpression on a Page is not working HOT 1
- transparent page have black lines
- TextObject Automatic line wrapping one more-character HOT 1
- Only authenticationclearpassword And authenticationMD5password are supported for now,received 10. when try to connect to postgres db
- FastReport.OpenSource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastreport.