एमवीसी 4 रेजर सी#नेट में क्रिस्टल रिपोर्ट कैसे बनाएं


नमस्ते,

मैं .chtml पेज में रिपोर्ट व्यूअर के साथ क्रिस्टल रिपोर्ट बनाना चाहता हूं, यह पीडीएफ के साथ संभव है लेकिन
रिपोर्ट व्यूअर के साथ नहीं.

यदि आपके पास कोई विचार है तो मुझे सुझाव दें।

मैं रेजर व्यू इंजन, एमवीसी 4, सी#,.नेट पर काम करता हूं

समाधान 1

मैंने एमवीसी में कभी भी क्रिस्टल रिपोर्ट का उपयोग नहीं किया लेकिन मुझे यह विवरण मिला, इसे जांचें
एमवीसी3 फ्रेमवर्क में रेजर व्यू के भीतर रिपोर्टव्यूअर कंट्रोल का उपयोग करना[^]

समाधान 3

आशा है कि यह ट्यूटोरियल आपकी मदद करेगा।

[^]

समाधान 2

मुझे उम्मीद है इससे मदद मिलेगी

http://dotnetawesome.blogspot.in/2013/11/how-to-use-crystal-report-in-mvc4.html[^]

समाधान 4

@page
@using System.Data.SqlClient;
@using System.Diagnostics;
@model QT2Docs.Pages.JobCostingAPIModel
@{
    string JobNumber = Request.Query["JobNumber"];
    Random rnd = new Random();
    int FileInt = rnd.Next(1, 100);
    string FileNum = FileInt.ToString();
    DateTime today = DateTime.Today;

    string CryConnect = System.Configuration.ConfigurationManager.AppSettings["CReportCon"];
    string FileName = " -F \"C:\\Reports\\JobCostDetailByJob.RPT\"";
    string RptOptions = " -A @JobNumber:" + JobNumber + " -A @StartDate:01/01/1900 -A @EndDate:" + (today.ToString("MM/dd/yyyy")) + " -A @GangRunJobs:0 -A @JobStatus:All -A @GroupBy:0 -A @DateTypeFilter:-1 -A @EstimateData:0 -A @PlantID:All ";
    string TheOutput = " -EPDF -O \"C:\\inetpub\\wwwroot\\QT2Docs\\wwwroot\\JobCostDetailByJob" + FileNum + ".pdf\"";

    string RptPareamiters = CryConnect + FileName + RptOptions + TheOutput;

    var process = Process.Start(@"c:\reports\crexport.exe", RptPareamiters);
    process.WaitForExit();

    //crexport.exe -S server -U sa -P password -D "database"                      /// server connection
    // -F "C:\Reports\InvoiceCreditNotes.rpt"                                     /// report file
    // -A @DocumentType:INVOICE -A @StartNum:%%A -A @EndNum:%%A -A @Batch:1       /// RTP paramiters format -A Paramiter:Value  the @ symbol is for SP value, do not use @ when just passing data
    // -EPDF -O "C:\Reports\InvoiceCreditNotes.pdf"                               /// FIle format and outputfile
    // crexport.exe was recompiled to .net 4.8 and code is from    https://github.com/rainforestnet/CrystalReportsNinja
    // Also *Note The application pool will need to use an identity that has rights to run and store report 
    Response.Redirect("/QT2Docs/JobCostDetailByJob" + FileNum + ".pdf");

This is the contents of JobCostingAPI.cshtml for my razor project called QT2Docs. when this page is feed the job number though http://somewebserver/QT2Docs/JobCostingAPI?Jobnumber=654321
it builds the report parameters and connection then deposits the pdf where i can link it. The FileNum (random)value is to help keep from more than one report over weighting a second concurrent run. Thank the people at rainforestnet for an old app that still kicks butt

コメント

タイトルとURLをコピーしました