I'm trying to get started with Crystal Reports using a reduced code approach. I tried inserting a SqlDataSource, CrystalReportViewer and CrystalReportSource as you can see below, with nothing inserted in the codebehind.
I do other consults to the same database with the connectionstring used here and defined at web.config so that's not the problem (i think). Shouldn't i be able to at least get past the login screen with that, and if not, what am i doing wrong at the moment?
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>"
SelectCommand="SELECT * FROM [Report] WHERE ([CodeU] = ?)">
<SelectParameters>
<asp:QueryStringParameter Name="CodeU" QueryStringField="codeQS"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="Print.rpt">
<DataSources>
<%--TableName="Report" --%>
<CR:DataSourceRef DataSourceID="SqlDataSource1" />
</DataSources>
</Report>
</CR:CrystalReportSource>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="1202px"
ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl=""
ToolPanelWidth="200px" Width="1104px" />
</div>
</form>
I do other consults to the same database with the connectionstring used here and defined at web.config so that's not the problem (i think). Shouldn't i be able to at least get past the login screen with that, and if not, what am i doing wrong at the moment?
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>"
SelectCommand="SELECT * FROM [Report] WHERE ([CodeU] = ?)">
<SelectParameters>
<asp:QueryStringParameter Name="CodeU" QueryStringField="codeQS"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="Print.rpt">
<DataSources>
<%--TableName="Report" --%>
<CR:DataSourceRef DataSourceID="SqlDataSource1" />
</DataSources>
</Report>
</CR:CrystalReportSource>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="1202px"
ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl=""
ToolPanelWidth="200px" Width="1104px" />
</div>
</form>