نمایش نتایج 1 تا 19 از 19

نام تاپیک: آموزش گزارش گیری با entity framework

  1. #1
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    آموزش گزارش گیری با entity framework

    سلام دوستان
    از اونجایی که آموزشی در رابطه با گزارش گیری با entity framework در این سایت و سایت های های فارسی ندیدم تصمیم گرفته مقاله لاتینی در این باره که کاملا صریح گفته شده براتون بزارم که علاقمندان استفاده کنند.
    در ضمن باید بگم که این مقاله منبع خاصی نداشت که بخوام منبعشو بزارم


    Step 1: Create New Solution
    1.Launch Visual Studio and select New Project… from the Start Page.
    2.Expand the Visual C#‎‎ templates and click on the Web templates. Select "ASP.NET Empty Web Application" and change the name of the project to "CRForEntityFramework".
    3.Click the OK button.

    Step 2: Create the Database
    1.Right click on the project file in the Solution Explorer and select "Add New Item…" from the pop-up menu.
    2.Click the "Data" node under Visual C#‎‎ Items. Click on the "SQL Server Database" template and name the file "CRTest.mdf". Click the Add button. You will get a message asking if you want to add the data file to the App_Data folder. Click the Yes button.
    If you don't have SQL Server Express installed you will be prompted to download the install. If you do have SQL Server Express installed then the database file will be created and you can now add a table.
    3.Right click on the CRTest.mdf file in the Solution Explorer and select "Open" from the pop-up menu.
    4.The database should be displayed in the Server Explorer window. Right click on the Tables node and select "Add New Table".
    5.A new table will appear in design mode. Enter "UserAccountId" for the first field and set its DataType to "int" and uncheck the "Allow Nulls" box. Also change this field to an Identity field by setting the IsIdentity property to "Yes".
    6.Add fields for FirstName, LastName, and EmailAddress. Make all these fields varchar(50) and do not allow nulls.
    7.Click the Save button on the toolbar and change the name of the table to UserAccount.
    8.Add a few records to this table by right clicking on the table in the Server Explorer and selecting "Show Table Data" from the pop-up menu. You can then just enter a few records by typing in the FirstName, LastName, and EmailAddress fields.

    Step 3: Create the Entity Data Model
    Now that you have the database you can create the Entity Data Model using the Entity Framework.
    1.Right click on the project file in the Solution Explorer and select AddàNew Item… from the pop-up menu.
    2.Click on the Data node under the Visual C#‎‎ templates. Click on the ADO.NET Entity Data Model template and change the name to CRTest.edmx. Now click the Add button.
    3.The Entity Data Model Wizard should appear. Choose "Generate From Database" and click the Next button.
    4.The "Choose Your Connection" screen should appear. Select the CRTest.mdf connection and click the Next button.
    5.The next screen allows you to select the database objects you want to include in the Entity Data Model. Expand the Tables node and check the box next to the UserAccount table.
    6.Click the "Finish" button. The UserAccount entity should appear in the CRTest.edmx file.
    Step 4: Create the XML Schema File
    There is no direct way to connect a Crystal Report file to an Entity Framework entity but you can create an XML schema file that contains the structure of the Entity and then connect that to the Crystal Report.
    1.Right click on the Project in the Solution Explorer and select Add New Item…
    2.Select the Data node under the Visual C#‎‎ Templates.
    3.Select the DataSet template, name the file UserAccountSchema.xsd, and click the Add button.
    4.Drag a DataTable object from the toolbox to the UserAccountSchema.xsd file.
    5.Change the name of the DataTable object to UserAccountSchema.
    6.Right click on the UserAccountSchema object and select AddàColumn from the pop-up menu.
    7.Change the name of the column to UserAccountId and change the DataType to System.Int32. To change the DataType you can go to the property window and set it there.
    8.Add the FirstName, LastName, and EmailAddress columns the same way but leave the DataType as System.String.

    Step 5: Create the Crystal Report
    You can now create the report using the XSD file.
    1.Right click on the project and select AddàNew Item…
    2.Select "Reporting" from the list of Visual C#‎‎ templates and select the Crystal Reports template.
    3.Change the name of the file to UserAccountReport.rpt and click the Add button.
    4.The Crystal Reports Gallery dialog will appear. Select "As a Blank Report" and click the OK button.
    5.In the Field Explorer window, right click on the Database Fields node and select "Database Expert…" from the pop-up menu.
    6.The Database Expert dialog should appear.
    7.Click the plus sign next to "Create New Connection"
    8.Click the plus sign next to "ADO.NET (XML)"
    9.The ADO.NET (XML) dialog should appear. Click on the button with three dots to browse to the UserAccountSchema.xsd file you created in the step above.
    10.Click the Finish button.
    11.You should see the UserAccountSchema under the ADO.NET (XML) node. Click on this node and then click the ">" button to move this to the Selected Tables list.
    12.Click the OK button.
    13.In the Field Explorer window you should see the UserAccountSchema under the Databases Fields node. Click the plus sign next to the table name and the fields should appear.
    14.Drag each field to the Details section of the report.
    15.Click the save button.

    Step 6: Create the ASP.NET Web Page to Display the Report
    The last step is to create the ASP.NET Web Page that will display the report in the Crystal Reports Viewer control and bind a query using the Entity Framework to the report.
    1.Right click on your project file in the Solution Explorer and select AddàNew Item from the pop-up menu.
    2.Click on the "Web" node under Visual C#‎‎ templates and then select the "Web Form" template.
    3.Change the name of the form to Default.aspx and click the Add button.
    4.Drag a Crystal Report Viewer control from the toolbox to the form.
    5.Double click on the form in design mode to create the Form_Load event handler.
    6.Add the following lines to the using statements.

    using CrystalDecisions.CrystalReports.Engine;

    using CrystalDecisions.Shared
    ;
    7.Add the following lines to the Form_Load event handler.


    ReportDocument report =new ReportDocument();

    report.Load(Server.MapPath("UserAccountReport.rpt"));
    using (CRTestEntities db =new CRTestEntities())
    {
    report.SetDataSource(from u in db.UserAccounts
    select new { u.UserAccountId, u.FirstName, u.LastName,
    u.EmailAddress });


    }

    CrystalReportViewer1.ReportSource = report;

    8.Right click on the Default.aspx file and select "Set As Start Page" from the pop-up menu.
    9.Run the project and you should see your report.

  2. #2
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    لطفا نظراتونو در مورد این مقاله بگید.
    و اینکه مباحث تکمیلی تر در این مورد بیان کنید تا دوستان استفاد کنند.
    و اگر سوالی در این مورد داشتید در این تایپیک مطرح کنید

  3. #3
    کاربر دائمی آواتار mhsmity
    تاریخ عضویت
    مهر 1387
    محل زندگی
    استان يزد
    سن
    36
    پست
    671

    نقل قول: آموزش گزارش گیری با entity framework

    سلام
    اینجا که بخش C#‎ هستش ؟

  4. #4
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    توی بخش سی شارپ بیشتر سوال هایی که مطرح میشه در مورد ADO.NET هستش.حالا یه پست هم ما در مورد entity FrmeworK زدیم.به جایی که بر نمی خوره.
    در ضمن ef با سی شارپ هم کار میشه.پس بی ربط هم نیستش

  5. #5
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    دوستان نظري ندارند؟
    واسم عجيبه كه چرا هيچ كس به EF علاقه اي نداره.اگر مشكلي داره و بدرد نخوره كه ماهم قيدشو بزنيم.يا اينكه دوستان نمي خوان انعطاف به خرج بدن؟

  6. #6

    نقل قول: آموزش گزارش گیری با entity framework

    خیلی ممنون...
    علاقه مندان به ef کم نیستند..

  7. #7
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    نقل قول نوشته شده توسط homan1374 مشاهده تاپیک
    خیلی ممنون...
    علاقه مندان به ef کم نیستند..
    ما كه حدود 9 ماه هست توي اين سايت فعاليت داريم علاقمند چنداني نديديم.

  8. #8

    نقل قول: آموزش گزارش گیری با entity framework

    سلام اتفاقا طرفدار زیاد داره یکیش که خودمم .
    خوب بود ترجمه اش میکردید بعد درخواست نظر میدادید همینطور توی تاپیک دیگه تشکر این پست رو زدم.
    موفق باشید

  9. #9
    کاربر دائمی آواتار uniqueboy_ara
    تاریخ عضویت
    فروردین 1389
    محل زندگی
    تهران
    پست
    420

    نقل قول: آموزش گزارش گیری با entity framework

    منم با firoozi90 موافقم!
    اکثر دوستان شایدم خیلی درباره EF شنیده باشن، ولی هیچ کدوم تن به این کوچ کردن نمیدن!!!
    در صورتی که استفاده ازADO.net کلاسیک نسبت به EF، مثل استفاده از Dos به جای Windows می مونه

  10. #10

    نقل قول: آموزش گزارش گیری با entity framework

    سلام
    ضمن تشکر
    تو زمینه EF منابع فارسی کمه به خاطر همینه که خیلی ها با اون آشنای ندارند ، و همچنین تو دانشگاه هم معمولا ADO تدریس میشه و خیلی ها هم به خودشون زحمت یادگیری تکنولوژی جدید را نمی دن!.

    اگه منابع یا آموزشی دارید خوشحال میشم که معرفی کنید.

  11. #11
    کاربر دائمی آواتار uniqueboy_ara
    تاریخ عضویت
    فروردین 1389
    محل زندگی
    تهران
    پست
    420

    نقل قول: آموزش گزارش گیری با entity framework

    مشکلی که اکقر ماها داریم اینهکه تمیتونیم ریسک کوچ کردن به یه تکنولوژی جدید تر رو قبول کنیم!
    خو منم 9 ماه پیش که کتاب Pro.Entity Framework 4.0 از انتشارات Apress رو شروع کردم بخونم، هیچوقت فکر نمیکردم که یه روزی بی خیال ADO بشم، ولی کتابو هنوز به نصف هم نرسونده بودم که دیدم یه عمری خودمو با ADO سر کار گذاشته بودم :) ، با این روش تمام کار های زمان بر و خسته کننده ADO از جلوی پای آدم برداشته میشه و کلی کار برنامه نویس راحت تر میشه :)

    واسه شروع کار میتونید از این استفاده کنید: پروژه ساخت دفترچه تلفن با استفاده از EF و LINQ

  12. #12

    نقل قول: آموزش گزارش گیری با entity framework

    واسه شروع کار میتونید از این استفاده کنید: پروژه ساخت دفترچه تلفن با استفاده از EF و LINQ
    به نظر من منبع فقط همین تاپیک هستش من غیر از این پست حرفه ای برای این اموش ندیدم...
    به اعتقاد منم منبع این اموزش بیش از حد کمه!
    و از دوستان اگه کسی Pro.Entity Framework به پستشون خورد معرفی کنند ، این کتاب هم که خیلی خلاصه رد شده.
    فرضا مثالهای join اینا خیلی کمه...که این اصل خودش به مانور های گسترده و متنوعی داره.
    در هر صورت این نوع برنامه نویسی عالیه بهینه بودن، سرعت ، سادگی.
    موفق باشید

  13. #13
    کاربر دائمی آواتار uniqueboy_ara
    تاریخ عضویت
    فروردین 1389
    محل زندگی
    تهران
    پست
    420

    نقل قول: آموزش گزارش گیری با entity framework

    اولین پست تو این زمینه رو جناب gwbasic زدن ( کارگاه عملی : ساخت پروژه ثبت سفارشات مرحله به مرحله ) که نکته های خیلی خوبی میشه ازش یاد گرفت :)
    اون کتاب به نظر من خیلی عالیه، چون با یه زبان بسیار ساده همه چیو توضیح میده و باعث گیج شدن آدمای تازه کار نمیشه، بعد که اصول رو یاد گرفتی دیگه بقیه ش میشه تحقیق و جستجوی خود برنامه نویس، تا ریزه کاری ها رو هم یاد بگیریم :)
    .
    .
    اینم یه منبع خوب واسه دستورات LINQ از جمله Join
    فایل های ضمیمه فایل های ضمیمه

  14. #14

    نقل قول: آموزش گزارش گیری با entity framework

    دوست عزیز uniqueboy_ara ممنونم از لطفت افتادید تو زحمت روال کار به همین شکل با اساس و ریتم کار آشنا بشیم ادامه اش میشه تغییر و ابتکار برنامه نویس.
    این مثال ها از جمله مثالهای microsoft نیست؟ Linq to sql ؟
    من نظر توی دنیای رایانه (از جمله برنامه نویسی) چیزی به نام کمبود منبع معنی نداره. محدود به دلیل نویی بودن برنامه هست.
    موفق باشید./

  15. #15
    کاربر دائمی آواتار uniqueboy_ara
    تاریخ عضویت
    فروردین 1389
    محل زندگی
    تهران
    پست
    420

    نقل قول: آموزش گزارش گیری با entity framework

    اینا دقیقا مثال های خود Microsoft هستن که من همشونو توی این فایل جمع آوری کردم :)

  16. #16
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    نقل قول نوشته شده توسط samadblaj مشاهده تاپیک
    سلام اتفاقا طرفدار زیاد داره یکیش که خودمم .
    خوب بود ترجمه اش میکردید بعد درخواست نظر میدادید همینطور توی تاپیک دیگه تشکر این پست رو زدم.
    موفق باشید
    به نظر من نيازي به ترجمه نداره .خيلي روان گفته شده .چون قدم به قدم هستش.اگر دوستان يه كم حوصله به خرج بدن و دوخط اولو بخونن ميفهمن كه من چي مي گم

  17. #17
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    دوستان علاقمند مي تونند از اين تايپيك هايي كه من قبا گذاشتم براي شروع استفاده كنند
    دانلود کتاب های آموزشی LINQ

    کد فرم login با entity framework

    آموزش ویرایش اطلاعات با Entity framework

    آموزش قدم به قدم اعمال اصلی با entity framework

  18. #18
    کاربر دائمی آواتار firoozi90
    تاریخ عضویت
    آذر 1390
    محل زندگی
    تهران
    پست
    572

    نقل قول: آموزش گزارش گیری با entity framework

    دوستان گرامي
    اگر كسي مبحث تكميلي تر رو داره يا اينكه سايتي رو ميشناسه كه در مورد EF هستش لطفا اينجا بزاره كه علاقمندان استفاده كنند

  19. #19
    کاربر تازه وارد آواتار khista
    تاریخ عضویت
    شهریور 1391
    محل زندگی
    خوزستان
    پست
    47

    نقل قول: آموزش گزارش گیری با entity framework

    عالی عزیز،ممنونم ازت خیلی تو وب گشتم تا این پست مفید شما رو پیدا کردم

تاپیک های مشابه

  1. آموزش: آموزش گزارش گیری از طریق Stimul در وب
    نوشته شده توسط crazy_1892 در بخش ابزارهای گزارش سازی
    پاسخ: 2
    آخرین پست: چهارشنبه 01 شهریور 1391, 14:49 عصر
  2. آموزش: آموزش گزارش گیری در C#‎ توسط Crystal Repot
    نوشته شده توسط ramin6868 در بخش C#‎‎
    پاسخ: 1
    آخرین پست: دوشنبه 11 مهر 1390, 13:08 عصر
  3. آموزش گزارش گیری در جاوا
    نوشته شده توسط ermia2008 در بخش Java SE : نگارش استاندارد جاوا
    پاسخ: 7
    آخرین پست: شنبه 13 شهریور 1389, 15:08 عصر
  4. آموزش گزارش گیری در جاوا
    نوشته شده توسط ermia2008 در بخش Java EE : نگارش سازمانی جاوا
    پاسخ: 0
    آخرین پست: چهارشنبه 26 اسفند 1388, 16:26 عصر
  5. آموزش گزارش گیری در جاوا
    نوشته شده توسط ermia2008 در بخش برنامه‌نویسی جاوا
    پاسخ: 0
    آخرین پست: چهارشنبه 26 اسفند 1388, 15:25 عصر

برچسب های این تاپیک

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •